import { lazy } from 'react'
import { Navigate } from "react-router-dom";

var Login = lazy(() => import('../views/Login/Login.tsx'))
var Header = lazy(() => import('../views/Header/Headers.tsx'))
var Table = lazy(() => import('../views/Table/Tables.tsx'))
var Response = lazy(() => import('../components/Response.tsx'))
var Dataanalysis = lazy(() => import('../views/dataanalysis/Dataanalysis.tsx'))
var Not = lazy(() => import('../views/Not/Not.tsx'))


var Reply = lazy(() => import('../views/Response/Response_办事/Reply'))
var Particulars = lazy(() => import('../views/Response/Response_办事/Particulars'))
var Guanli = lazy(() => import('../views/Response/Response_办事/Guanli.tsx'))
var Restegr = lazy(() => import('../views/restegr/Restegr.tsx'))

//事项库的
var Quxiao = lazy(() => import('../views/management/事项管理/Quxiao.tsx'))
var Rizhi = lazy(() => import('../views/management/事项管理/Rizhi.tsx'))
var Shixiangku = lazy(() => import('../views/management/事项管理/Shixiangku.tsx'))
var Addshi = lazy(() => import('../views/management/事项管理/Addshi'))

//互动反馈的

var Guanli = lazy(() => import('../views/Response/Response_办事/Guanli.tsx'))
var Guanliadd = lazy(() => import('../views/Response/Response_办事/Guanliadd'))   //新增办事请求
var Pingjia = lazy(() => import('../views/Response/Response_评价/Pingjia.tsx'))
var Pingjiaadd = lazy(() => import('../views/Response/Response_评价/Pingjiaadd'))  // 新增评价
var Tousu = lazy(() => import('../views/Response/Response_投诉/Tousu.tsx'))
var Tousuadd = lazy(() => import('../views/Response/Response_投诉/Tousuadd'))     //新增投诉
var Zixun = lazy(() => import('../views/Response/Response_咨询/Zixun.tsx'))
var Zixunadd = lazy(() => import('../views/Response/Response_咨询/Zixunadd'))     //新增咨询
var ZixunXinxi = lazy(() => import('../views/Response/Response_咨询/ZixunXinxi'))   //咨询详细信息页面

//信息管理
var Zhengce = lazy(() => import('../views/Information/政策法规/Zhengce.tsx'))
//信息管理
var Zhengce = lazy(() => import('../views/Information/政策法规/Zhengce'))
var Xinzeng = lazy(() => import('../views/Information/政策法规/Xinzeng.tsx'))
//首页
var Tables = lazy(() => import('../views/Shouye/Tables'))
//好差评页面
var GoodPJ = lazy(() => import('../views/Shouye/GoodPJ'))
var TousuXinxi = lazy(() => import('../views/Response/Response_投诉/TousuXinxi.tsx'))
//投诉详情
// 投诉回复

var TousuReply = lazy(() => import('../views/Response/Response_投诉/TousuReply.tsx'))
//法人服务
// var CorporateServices = lazy(() => import('../views/management/法人服务/CorporateServices.tsx'))
// var HeatClassification = lazy(() => import('../views/management/法人服务/HeatClassification.tsx'))
// var SubjectClassification = lazy(() => import('../views/management/法人服务/SubjectClassification.tsx'))
// var DepartmentClassification = lazy(() => import('../views/management/法人服务/DepartmentClassification.tsx'))
// var RunOnce = lazy(() => import('../views/management/法人服务/RunOnce.tsx'))
export default [
  {
    // 头部一级路由
    path: '/index',
    element: <Header />,
    children: [
      {
        // 工作台
        path: '/index/table',
        element: <Table />,
      },
      {
        // 事项管理
        path: '/index/management',
        element: <Response />,
        // 三级路由
        children: [
          {
            path: '/index/management/Quxiao',
            element: <Quxiao />,
          },
          {
            path: '/index/management/Rizhi',
            element: <Rizhi />,
          },
          {
            path: '/index/management/Shixiangku',
            element: <Shixiangku />,
          },
          // 法人服务
          {
            // 三级路由重定向
            path: '/index/management',
            element: <Navigate to="/index/management/Shixiangku" />
          },
        ]
      },
      {
        // 互动反馈
        path: '/index/response',
        element: <Response />,
        // 三级路由
        children: [
          {
            path: '/index/response/Guanli',
            element: <Guanli />,
          },
          {
            path: '/index/response/Pingjia',
            element: <Pingjia />,
          },
          {
            path: '/index/response/Tousu',
            element: <Tousu />,
          },
          {
            path: '/index/response/Zixun',
            element: <Zixun />,
          },
          {
            // 三级路由重定向
            path: '/index/response',
            element: <Navigate to="/index/response/Guanli" />
          },
        ]
      },
      {
        // 信息发布
        path: '/index/Information',
        element: <Response />,
        // 三级路由
        children: [
          {
            path: '/index/Information/Zhengce',
            element: <Zhengce />,
          },
          {
            // 三级路由重定向
            path: '/index/Information',
            element: <Navigate to="/index/Information/Zhengce" />
          },
        ]
      },
      {
        // 数据分析
        path: '/index/dataanalysis',
        element: <Dataanalysis />,
        // 三级路由
        children: [


        ]
      },
      {
        // 二级路由重定向
        path: '/index',
        element: <Navigate to="/index/table" />
      },
      {
        path: '*',
        element: <Not />
      },
    ],

  },
  //办事指南评价
  {
    path: '/Particulars',
    element: <Particulars />,

  },
  //办事指南回复
  {
    path: '/reply',
    element: <Reply />,
  },
  // 新增法规
  {
    path: '/Xinzeng',
    element: <Xinzeng />

  },
  //新增办事
  {
    path: '/Guanliadd',
    element: <Guanliadd />,
  },
  //办事指南回复
  //新增评价
  {
    path: '/Pingjiaadd',
    element: <Pingjiaadd />,
  },
  //新增投诉
  {
    path: '/Tousuadd',
    element: <Tousuadd />,
  },
  //办事指南回复
  {
    path: '/Zixunadd',
    element: <Zixunadd />,
  },
  //咨询详情页面
  {

    path: '/ZixunXinxi/:id',
    element: <ZixunXinxi />,
  },

  {

    path: 'TousuXinxi/:id',
    element: <TousuXinxi />,
  },
  //孙瑞给的界面
  {
    path: '/Tables',
    element: <Tables />,
  },
  //好差评页面
  {

    path: '/GoodPJ',
    element: <GoodPJ />,
  },
  //投诉回复
  {

    path: '/TousuReply/:id',

    element: <TousuReply />,
  },
  {
    // 登录路由
    path: '/login',
    element: <Login />
  },
  {
    // 新增事项路由
    path: '/addshi',
    element: <Addshi />
  },
  {
    // 新增事项路由
    path: '/Restegr',
    element: <Restegr />
  },
  {
    path: '/',
    element: <Navigate to="/index" />
  },
  {
    path: '*',
    element: <Not />
  },
]